#ifndef BASEDIALOG_H
#define BASEDIALOG_H

#include "Frameless.h"

#include <QDialog>

class OverlayWidget;
class BaseDialog : public QDialog, public Frameless
{
    Q_OBJECT
public:
    explicit BaseDialog(QWidget *parent = nullptr);
    void done(int) override;

protected:
    void showEvent(QShowEvent *event) override;
    void initGraphicsEffect(QWidget *widget);
    static QBitmap updateRegionMask(const QSize &size);
    virtual bool withDropShadow();
    QMargins layoutMargins() override;
    bool canWindowMove() override;
    bool event(QEvent *event) override;
    void mousePressEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    void focusInEvent(QFocusEvent *event) override;
    bool canResize() override;

private:
    OverlayWidget *m_overlayWidget;
};

#endif // BASEDIALOG_H
